/*
 This file is part of the OdinMS Maple Story Server
 Copyright (C) 2008 ~ 2010 Patrick Huy <patrick.huy@frz.cc> 
 Matthias Butz <matze@odinms.de>
 Jan Christian Meyer <vimes@odinms.de>

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU Affero General Public License version 3
 as published by the Free Software Foundation. You may not use, modify
 or distribute this program under any other version of the
 GNU Affero General Public License.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Affero General Public License for more details.

 You should have received a copy of the GNU Affero General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package handling.channel.handler;

import client.MapleClient;
import scripting.NPCScriptManager;
import tools.data.LittleEndianAccessor;

public class UserInterfaceHandler {

    public static final void CygnusSummon_NPCRequest(final MapleClient c) {
        if (c.getPlayer().getJob() == 2000) {
            NPCScriptManager.getInstance().start(c, 1202000, null);
        } else if (c.getPlayer().getJob() == 1000) {
            NPCScriptManager.getInstance().start(c, 1101008, null);
        }
    }

    public static final void InGame_Poll(final LittleEndianAccessor slea, final MapleClient c) {
        final boolean PollEnabled = false;
        final String Poll_Question = "Are you mudkiz?";
        final String[] Poll_Answers = {"test1", "test2", "test3"};
        if (PollEnabled) {
            c.getPlayer().updateTick(slea.readInt());
            final int selection = slea.readInt();

            if (selection >= 0 && selection <= Poll_Answers.length) {
                // if (MapleCharacterUtil.SetPoll(c.getAccID(), selection)) {
                // c.getSession().write(CField.getPollReply("Thank you.")); //idk what goes here
                // lol
                // }
            }
        }
    }

    public static final void ShipObjectRequest(final int mapid, final MapleClient c) {
        // BB 00 6C 24 05 06 00 - Ellinia
        // BB 00 6E 1C 4E 0E 00 - Leafre

        /*
         * EventManager em; int effect = 3; // 1 = Coming, 3 = going, 1034 = balrog
         * 
         * switch (mapid) { case 101000300: // Ellinia Station >> Orbis case 200000111:
         * // Orbis Station >> Ellinia em =
         * c.getChannelServer().getEventSM().getEventManager("Boats"); if (em != null &&
         * em.getProperty("docked").equals("true")) { effect = 1; } break; case
         * 200000121: // Orbis Station >> Ludi case 220000110: // Ludi Station >> Orbis
         * em = c.getChannelServer().getEventSM().getEventManager("Trains"); if (em !=
         * null && em.getProperty("docked").equals("true")) { effect = 1; } break; case
         * 200000151: // Orbis Station >> Ariant case 260000100: // Ariant Station >>
         * Orbis em = c.getChannelServer().getEventSM().getEventManager("Geenie"); if
         * (em != null && em.getProperty("docked").equals("true")) { effect = 1; }
         * break; case 240000110: // Leafre Station >> Orbis case 200000131: // Orbis
         * Station >> Leafre em =
         * c.getChannelServer().getEventSM().getEventManager("Flight"); if (em != null
         * && em.getProperty("docked").equals("true")) { effect = 1; } break; case
         * 200090010: // During the ride to Orbis case 200090000: // During the ride to
         * Ellinia em = c.getChannelServer().getEventSM().getEventManager("Boats"); if
         * (em != null && em.getProperty("haveBalrog").equals("true")) { effect = 1; }
         * else { return; } break; default:
         * System.out.println("Unhandled ship object, MapID : " + mapid); break; }
         * c.getSession().write(CField.boatPacket(effect));
         */
    }
}
